package com.sxbbc.common.core.entity.jz;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 主分类-产品一级分类信息表
 * </p>
 *
 * @author leehao
 * @since 2019-04-30
 */
@TableName("proc_first_classify_main")
public class ProcFirstClassifyMain extends Model<ProcFirstClassifyMain> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 分类名称
     */
    private String name;

    /**
     * 分类图片
     */
    private String url;

    /**
     * 1店铺分类  2供应商分类 3平台分类
     */
    private Integer type;

    /**
     * 目标id，type不为3时，分别指向对应的店铺或供应商
     */
    private Integer targetId;

    /**
     * 分类排序 越大越靠前
     */
    private Integer sort;

    /**
     * 1正常 0无效
     */
    private Integer status;

    private Date createtime;

    @TableField(exist = false)
    private List<ProcSecondClassifyMain> secondClassifyMains;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public Integer getTargetId() {
        return targetId;
    }

    public void setTargetId(Integer targetId) {
        this.targetId = targetId;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }
    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public List<ProcSecondClassifyMain> getSecondClassifyMains() {
        return secondClassifyMains;
    }

    public void setSecondClassifyMains(List<ProcSecondClassifyMain> secondClassifyMains) {
        this.secondClassifyMains = secondClassifyMains;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "ProcFirstClassifyMain{" +
        "id=" + id +
        ", name=" + name +
        ", url=" + url +
        ", type=" + type +
        ", targetId=" + targetId +
        ", sort=" + sort +
        ", status=" + status +
        ", createtime=" + createtime +
        "}";
    }
}
